package com.security.door.service.Impl;

import com.github.pagehelper.PageInfo;
import com.security.door.core.base.BaseService;
import com.security.door.dao.mapper.calendarSettingMapper;
import com.security.door.model.domain.calendarSetting;
import com.security.door.model.dto.calendarSettingDto;
import com.security.door.service.IcalendarSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class calendarSettingServiceImpl extends BaseService<calendarSetting> implements IcalendarSettingService {
    @Autowired
    calendarSettingMapper icalendarSettingMapper;

    public List<calendarSetting> selectListByDate(calendarSettingDto entityDto) {
        return icalendarSettingMapper.selectListByDate(entityDto);
    }

    public calendarSetting selectByDate(calendarSetting entity) {
        return icalendarSettingMapper.selectByDate(entity);
    }

    public calendarSetting selectByGlobal() {
        return icalendarSettingMapper.selectByGlobal();
    }

    public Integer cancelWorkDay(String attDate) {
        return icalendarSettingMapper.cancelWorkDay(attDate);
    }

    public PageInfo<calendarSetting> queryListWithPage(calendarSettingDto entity) {
        var actionList = icalendarSettingMapper.queryListWithPage(entity);
        return new PageInfo<>(actionList);
    }

    public int deleteByIds(String guids) {
        return icalendarSettingMapper.deleteByIds(guids);
    }
}